$(function() {
	$('.next').click(function() {
		$('html,body').animate({
			scrollTop: $('#section1').outerHeight() + 1
		}, 600);
	});
	$('#menu').on('click', function() {
		var mark = $(this).attr('data-mark');
		if (mark === 'false') {
			$(this).removeClass('menu_open').addClass('menu_close');
			//open
			$('#navgation').removeClass('navgation_close').addClass('navgation_open');
			$(this).attr({
				'data-mark': "true"
			});
		} else {
			$(this).removeClass('menu_close').addClass('menu_open');
			//close
			$('#navgation').removeClass('navgation_open').addClass('navgation_close');
			$(this).attr({
				'data-mark': "false"
			});
		}
	});
	$.ajax({
		type: "get",
		url: urls.cliUrl + 'article/list/hot',
		async: true,
		data: {
			"pageNo": 1,
			"pageSize": 3
		},
		success: function(res) {
			if (res.errorCode === 0) {
				$('#hot-rows').html("");
				for(let hot of res.data){
					$('#hot-rows').append("<div class='layui-col-xs12 layui-col-sm4 layui-col-md4  wow fadeInUp' style='padding: 0 10px'><div class='single-news'><div class='news-head'><img src='" + hot.advertisingImage + "'><a href='read.html?id=" + hot.id + "' class='link'><i class='fa fa-link'></i></a></div><div class='news-content'><h4><a href='javascript:;'>" + hot.title + "</a></h4><div class='date'>" + timestampToDate(hot.createTime) + "</div><p>" + hot.htmlContent + "</p><a href='read.html?id=" + hot.id + "' class='btn'>阅读更多</a></div></div></div>");
				}
			} else {
				console.log(res.description);
			}
		}
	});
});
